package com.compunit.composite.core.interfaces;

import java.util.Properties;

/**
 * <code>IConfigurationExporter</code> defines interface
 * of an exporter unit that is responsible for caching
 * and exporting the cached component properties that
 * forms a configuration set into an XML structured file.
 *
 * @author Yi Wang (Neakor)
 * @version Creation date: 12-05-2009 14:48 EST
 * @version Modified date: 12-05-2009 14:49 EST
 */
public interface IConfigurationExporter extends IExporter {
	
	/**
	 * Put the properties for the component with given
	 * fully qualified class name into the configuration
	 * cache.
	 * @param classname The <code>String</code> fully
	 * qualified class name of the component.
	 * @param properties The <code>Properties</code> data.
	 */
	public void put(final String classname, final Properties properties);

	/**
	 * Remove the properties data associated with the
	 * component with given fully qualified class name
	 * from the configuration cache.
	 * @param classname The <code>String</code> fully
	 * qualified class name of the component.
	 * @return The <code>Properties</code> data.
	 */
	public Properties remove(final String classname);
	
	/**
	 * Check if the given fully qualified class name has
	 * an associated properties data.
	 * @param classname The <code>String</code> fully
	 * qualified class name of the component.
	 * @return <code>true</code> if there is already a
	 * properties data cached. <code>false</code> otherwise.
	 */
	public boolean contains(final String classname);
	
	/**
	 * Retrieve the properties data associated with the
	 * component with given fully qualified class name
	 * @param classname The <code>String</code> fully
	 * qualified class name of the component.
	 * @return The <code>Properties</code> data.
	 */
	public Properties get(final String classname);
}
